<ui:composition xmlns:p='http://primefaces.org/ui'
                xmlns:ui='http://java.sun.com/jsf/facelets'
                xmlns:x='http://java.sun.com/jsf/composite/ui/component' xmlns:h="http://java.sun.com/jsf/html">

<p:toolbar styleClass='toolBar'>

<p:toolbarGroup style='width:100%;text-align: center' styleClass='align-text-bottom align-bottom'>

  <p:commandButton value='' style='float:left;height:1px;width:1px'/>

  <p:commandButton id='btnNew'   icon='ui-icon-new'  title='Nuevo'    actionListener='#{bean.uiClean}'  update='@(.#{bean.name})' process='@this' rendered='#{ bean.form}'                  style='border:none; float:left;  width:70px'/>

  <p:commandButton id='btnSave'  icon='ui-icon-save' title='Guardar'  actionListener='#{bean.uiMerge}'  update='@(.#{bean.name})' process='@this #{process}' rendered='#{ bean.form and !bean.isRead}' style='border:none; float:left;  width:70px'/>

  <p:commandButton id='btnPrint' icon='ui-icon-print' title='Imprimir' actionListener='#{bean.uiPrint}'  update='@(.#{bean.name})' process='@this @(.#{bean.name})' rendered='#{bean.form and print != null and bean.entity.id != null}' style='border:none; float:left;  width:70px'><p:printer target='#{print}'/></p:commandButton>

  <p:commandButton id='btnPrTxt' icon='ui-icon-print' title='Imprimir' actionListener='#{bean.uiPrint}'  update='@(.#{bean.name})' process='@this' rendered='#{bean.form and printTxt != null and bean.entity.id != null}' style='border:none; float:left;  width:70px'/>

    <h:panelGrid columns='3' cellpadding='0' cellspacing='0' style='float:right'>

    <x:fieldD t=' De ' v='#{dateIni}' wT='25px' w='70px' style='float:right;margin-top:3px' rendered='#{dateIni != null}'/>

    <x:fieldD t=' a '  v='#{dateEnd}' wT='20px' w='70px' style='float:right;margin-top:3px' rendered='#{dateEnd != null}'/>

    <p:commandButton id='btnFind'  icon='ui-icon-check' title='Buscar'   actionListener='#{bean.uiFind}'   update='@(.#{bean.name})' process='@(.#{bean.name})' styleClass='rmvCorner' style='border-top: none;border-right: none;width: 22px;height: 18px'/>

    </h:panelGrid>

  <p:commandButton id='btnTitle' value='#{title}' actionListener='#{bean.uiForm}'   update='@(.#{bean.name})' process='@this' rendered='#{ bean.form}'                  style='border:none; font-weight:bold; background:transparent'/>

  <p:commandButton id='btnLeft'  icon='ui-icon-left' title='Atras'    actionListener='#{bean.uiForm}'   update='@(.#{bean.name})' process='@this' rendered='#{!bean.form}'                  style='border:none; float:left'/>

</p:toolbarGroup>


<p:contextMenu for='btnTitle' style='width:80px' rendered='#{not empty bean.lsEntity}'>

  <p:menuitem icon='ui-icon-print'  style='padding-left:8px' value='.. csv' ajax='false'><p:dataExporter type='csv' target='#{export}' fileName='#{title}'/></p:menuitem>

  <p:menuitem icon='ui-icon-print'  style='padding-left:8px' value='.. xls' ajax='false'><p:dataExporter type='xls' target='#{export}' fileName='#{title}' postProcessor='#{bean.processXLS}'/></p:menuitem>

  <p:menuitem icon='ui-icon-search' style='padding-left:8px' value='.. Filtrar' actionListener='#{bean.uiFilter}'  update='@(.#{bean.name})' process='@this'/>

</p:contextMenu>

</p:toolbar>

</ui:composition>